package com.example.fms.exception;

import com.example.fms.vo.Meta;
import lombok.Getter;

public enum ExceptionEnum {
    TEST_DATA(1,"TEST.DATA",new Meta("最小起订量运费规则冲突",100)),

    MIN_CONFLICT_RULE(100,"最小起订量运费规则冲突",new Meta("最小起订量运费规则冲突",100)),
    MIN_CONFLICT_RULE_NAME(101,"规则名称冲突",new Meta("最小起订量运费规则冲突",100)),
    THE_CITY_IS_EMPTY(102,"请传入市级信息",new Meta("最小起订量运费规则冲突",100)),
    MIN_CONFLICT_IS_NUll(103,"最小规则为空",new Meta("最小起订量运费规则冲突",100)),
    STANDARD_CONFLICT_IS_NUll(104,"标准规则为空",new Meta("最小起订量运费规则冲突",100)),
    ID_ONT_NUll(105,"id不能为空",new Meta("最小起订量运费规则冲突",100)),
    STANDARD_CONFLICT_RULE(106,"标准运费规则冲突",new Meta("最小起订量运费规则冲突",100)),

    PASSWORD_IS_NULL(301,"密码不能为空",new Meta("密码不能为空",301)),
    USER_IS_NULL(302,"用户名不能为空",new Meta("用户名不能为空",302)),
    USER_IS_NOT(303,"用户不存在",new Meta("用户不存在",303)),
    USER_NOT(304,"用户已存在",new Meta("用户已存在",304)),


    USER_DOES_NOT_EXIST(304,"用户名错误",new Meta("用户名错误",304)),
    PASSWORD_ERROR(305,"密码错误",new Meta("密码错误",305)),

    DELETE_NUll(107,"删除数据不存在",new Meta("删除数据不存在",107)),

    ACTIVITY_STATUS_INCORRECT(501,"活动状态错误",new Meta("活动状态错误",501)),
    MAXIMUM_NUMBER_OF_PEOPLE(502,"人数达到上限",new Meta("人数达到上限",502)),
    ALREADY_PARTICIPATED_IN_THE_EVENT(503,"已参加过活动",new Meta("已参加过活动",503));






    @Getter
    private final int code;
    @Getter
    private final String msgKey;
    @Getter
    private final Meta meta;


    ExceptionEnum(int code, String msgKey, Meta meta) {
        this.code = code;
        this.msgKey = msgKey;
        this.meta = meta;
    }
}

